<#import "../shared/form.ftl" as form />
<#import "../shared/spring.ftl" as spring />

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="${baseUrlStatic}/common/style/bootstrap.min.css" />
    <script type="text/javascript" src="${baseUrlStatic}/common/script/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="${baseUrlStatic}/common/script/bootstrap.min.js"></script>
</head>
<body>
<@form.form action="${baseUrlRoot}/admin/account/login" method="post">
    <table>
        <tr>
            <th>用户名:</th>
            <td><input type="text" name="username" value="${(user??) ? string(user.username!"", "")}" /></td>
            <td>
                <#if user??>
                    <@spring.bind "user.username" />
                    <@spring.showErrors "" />
                </#if>
            </td>
        </tr>
        <tr>
            <th>密码:</th>
            <td><input type="password" name="password" value="${(user??) ? string(user.password!"", "")}" /></td>
            <td>
                <#if user??>
                    <@spring.bind "user.password" />
                    <@spring.showErrors "" />
                </#if>
            </td>
        </tr>
        <tr>
            <th></th>
            <td><input type="submit" value="Login" /></td>
            <td>${message!""}</td>
        </tr>
    </table>
</@form.form>
</body>
</html>